package com.touchportfolio.events
{	
	import flash.events.Event;
	
	/**
	* PayloadEvent
	* An event where you can pass data with.
	*/
		
	public class PayloadEvent extends Event
	{
		
		//_______________ VARIABLES __________________//
		
		/**
		* @var the payload data
		*/
		private var _payload:*;
		
		public static const PAYLOAD:String = "payload";
		
		//_______________ CONSTRUCTOR _______________//
		
		/**
		* @param the data you want to pass
		* @param the type event
		* @param bubbles default false
		* @param cancelable default false
		* @return void
		*/
		public function PayloadEvent(payload:*, type:String, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			super(type, bubbles, cancelable);
			_payload = payload;
		}
		
		//_______________ GETTERS __________________//
		
		/**
		* Returns the payload data.
		* @return void
		*/
		public function get payload():* {
			return _payload;
		}
		
	}
}